Organization functions
Easy access to agm organization functions. You probably need @babel/polyfill
for this to work.
Fetch organization information by environment ID
import {fetchOrganizationByEnvironmentId} from '@agderposten/organization-functions';
fetchOrganizationByEnvironmentId('4d63d444-d418-4981-8c0e-f5d26ea334db')
.then((organization) => {
console.log(organization.name);
});
Fetch organization information by hostname
import {fetchEnvironmentByHostname} from '@agderposten/organization-functions';
fetchEnvironmentByHostname('agderposten.no')
.then((organization) => {
console.log(organization.name);
});
Fetch organization information by title code
import {fetchEnvironmentByTitleCode} from '@agderposten/organization-functions';
fetchEnvironmentByTitleCode('ag')
.then((organization) => {
console.log(organization.name);
});